test-basic: Always chown back before doing assertion
authorColin Walters <walters@verbum.org>
Thu, 14 May 2015 02:17:26 +0000 (22:17 -0400)
committerColin Walters <walters@verbum.org>
Thu, 14 May 2015 02:18:36 +0000 (22:18 -0400)
Sometimes I rerun the tests for debugging in the same directory, and
having it be not writable breaks `rm * -rf`.

tests/basic-test.sh

index 834e76ddda6c7004cd5aab6ec691230a9a4143d3..3b57f66d77507a1bf4c5f8369c53d2991d4f66e5 100755 (executable)
@@ -396,8 +396,8 @@ if test "$(id -u)" != "0"; then
     $OSTREE init --mode=archive-z2 --repo=repo-noperm
     chmod -w repo-noperm/objects
     $OSTREE --repo=repo-noperm pull-local repo 2> error-message || touch expected-fail
+    chmod +w repo-noperm/objects
     assert_has_file expected-fail
     assert_file_has_content error-message "Permission denied"
-    chmod +w repo-noperm/objects
     echo "ok unwritable repo was caught"
 fi